package ai.application;

import ai.agents.Agent;
import ai.agents.braitenberg.*;
import ai.gui.Gui;
import ai.lights.*;
import ai.spatial.Vector;

public class Controller {
	private int environmentMinX = 0;
	private int environmentMinY = 0;
	private int environmentMaxX = 12;
	private int environmentMaxY = 7;
	
	public void run(){
		Gui gui = new Gui(environmentMinX,environmentMinY, environmentMaxX, environmentMaxY);

		Environment environment = new Environment(environmentMinX,environmentMinY, environmentMaxX, environmentMaxY);
		Simulation simulation = new Simulation(gui, environment);

		Agent agent = new LightLovingBraitenbergAgent(new Vector(0,0), new Vector(3,3));
		Agent agent2 = new LightHatingBraitenbergAgent(new Vector(0,0), new Vector(2,-4));
		Agent agent3 = new ShinyLightLovingBraitenbergAgent(new Vector(0, 0), new Vector(12, 7));
		Agent agent4 = new ShinyLightHatingBraitenbergAgent(new Vector(0, 0), new Vector(5,5));
		simulation.addAgent(agent, new Vector(0,0));
		simulation.addAgent(agent2, new Vector(2,8));
		simulation.addShinyAgent(agent3, new Vector(7, 4));
		simulation.addShinyAgent(agent4, new Vector(6, 3));
		simulation.addLight(new SimpleLight(), new Vector(6,3));
		//simulation.addLight(new SimpleLight(), new Vector(2,2));
		//simulation.addLight(new SimpleLight(), new Vector(6,5));
		simulation.run();
	}
	
	public static void main(String[] args){
		System.out.println("hello ai world");
		new Controller().run();
	}
}
